-- GENERATED SPELL FOR [Expedition Deathguard] --


function spell0_24317(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24317', 10262, 1)
end

function spell1_24317(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(16100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24317', 548, 1)
end

function spell2_24317(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(14516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24317', 677, 1)
end

function Sorts_24317(pUnit, Event)
local choix_sorts_24317 = math.random(0, 2)
if choix_sorts_24317 == 0 then
pUnit:RegisterEvent('spell0_24317', 1, 1)
end
if choix_sorts_24317 == 1 then
pUnit:RegisterEvent('spell1_24317', 1, 1)
end
if choix_sorts_24317 == 2 then
pUnit:RegisterEvent('spell2_24317', 1, 1)
end
end

function mob24317_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24317', math.random(1500, 3000), 1)
end

function mob24317_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24317_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24317_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24317, 1, 'mob24317_Action')
RegisterUnitEvent(24317, 2, 'mob24317_Leave')
RegisterUnitEvent(24317, 3, 'mob24317_Kill')
RegisterUnitEvent(24317, 4, 'mob24317_Die')
